import request from '../utils/request';

//查询一个厂家的所有供应商信息
export const selectSupAll = query => {
    return request({
        url: '/api/srm/supinfo/doMain',
        method:'post',
        // url:'./json/selectAllSupplier.json',
        // method: 'get',
        params: query
    });
};
//添加一个厂家的供应商
export const doAdd = query => {
    return request({
        url: '/api/srm/supinfo/doAdd',
        method:'post',
        // url:'./json/true.json',
        // method: 'get',
        data: query
    });
};
/*修改供应商*/
export const doUpdate = query => {
    return request({
        url: '/api/srm/supinfo/doUpdate',
        method:'post',
        // url:'./json/true.json',
        // method: 'get',
        data: query
    });
};
/*删除供应商*/
export const doDelete = query => {
    return request({
        url: '/api/srm/supinfo/doDelete',
        method:'post',
        // url:'./json/true.json',
        // method: 'get',
        params: query
    });
};
/*根据主键supId查询*/
export const selectOneSup = query => {
    return request({
        url: '/api/srm/supinfo/selectById',
        method:'post',
        // url:'./json/selectOneSupplier.json',
        // method: 'post',
        params: query
    });
};
/*根据厂家ID查询 不分页*/
export const selectAllSupBy = query => {
    return request({
        url: '/api/srm/supinfo/selectByManuId',
        method:'post',
        // url:'./json/selectAllSupplier.json',
        // method: 'get',
        params: query
    });
};
/*导出*/
export const excelSup = query => {
    return request({
        url: '/api/srm/excel/exportSupExcel',
        method:'get',
        // url:'./json/true.json',
        // method: 'get',
        params: query
    });
};


